Encapsulating Object.getPrototypeOf