Fix wheezy detection and add libmysql switch