use -fpermissive on OS X when g++ is used - closes #1835