Man charged with impersonating an officer