Man accused of impersonating a police officer