cmake changes to match upstream and removal of lib prefix with mingw