Add a macro to choose floating point precision and fix windows build