Merged changes from https://bitbucket.org/jose_schmidt/rails-sqlserver-adapter-sql-server-2000-friendly