Optional request animation frame

Fixes #18