Modified extraction method for freetds and php 5.3.27