fix cmake check for dlsym() when a subproject of mysql 5.6
only append -fimplicit-templates if -fno-implicit-templates is already there because of mysql/mariadb