CCD photometry of the globular cluster systems in NGC 4494 and NGC 4565