Restore lrint() for MSVC, use double in pow()