Correctly preserve prototype methods.