Use int cast for rounding.

-std::rint returns float instead of int.
-std::rint is missing in msvc.
-A third party library can change behavior of
mercator with std::fesetround() which is very bad.
Move constants to cpp for c++11 compatibility.