Update requestanimationframeshim.js

Refactored the setTimeout-based solution.