workaround for mysql 5.6.12's mysql_config

mysql_config from mysql 5.6.12 includes various -W flags that are not supposed by OS X's gcc. this just trims them out. hopefully it gets fixed upstream though.

thanks to @zimbatm - see #20788