[win] Fix bug and improve configure.ac.

Add --enable-mysql configure option.