Check if g++ is clang++ on MacOSX and set appropriate options

Proposed fix for issue #485