tweaks to compile under OS X