Removewarning options OSX does not recognise, allowing compilation.

Part one of the #3405 bugfix.