Fix build on OS-X, CentOS5, CentOS6 for configuration "--disable-shared --enable-static".