Search for long-lived heavy charged particles using a ring imaging Cherenkov technique at LHCb