compile fixes for OSX. Dll and mdb are now copied correctly