Add option to compile on Windows
Fix for gcc >= 4.7.0
Improve portability to MSVC