Fixed error for browsers lacking requestAnimationFrame

Also changed spaces to tabs for consistency.