mysql: fix for workaround for 5.6.12's mysql_config (5c0ea906f37f9c82da72006771413fce56f35f83)

this commit correctly strips out all invalid compiler flags. in addition, it doesn't
strip out the -Wall flag as the previous regex did.