fix framework loading on OSX
consolidate compiler pragmas