Check existence of get_charset_number

Based on the following patch:

commit 1cda14f68713270cb2a1c4d14c199ed5ad337f74
Author: Katsuyuki TATEISHI <kt@wheel.jp>
Date:   Thu Oct 16 22:29:41 2014 +0900

    Fix error on loading dbd.mysql with MySQL 5.5

    When this module is build with MySQL (or MariaDB) 5.5, following error occured
    on (use dbd.mysql) and this commit fix it:

      *** ERROR: Compile Error: failed to link ./dbd_mysql.so dynamically: \
       ./dbd_mysql.so: undefined symbol: get_charset_number