Fixed couple of Visual Studio errors of invalid compiler flags and some more compatibility issues.