Compile fix for HTML5
Fix power of two check