Fix mysql linking on non-win32 platforms