Use a more portable animation loop.