Make some changes to compile the library under windows