To test you can clear the native one:
window.requestAnimationFrame = undefined;
window.mozRequestAnimationFrame = undefined;
window.webkitRequestAnimationFrame = undefined;
... run shim here...
BTW You also need to make your shim self-invoking:
var myfunc = (function() { ... })();
See demo here.