Rewrite prototype declarations