Some fixes for building from source (64bit windows)