Fix bug with mysqli on PHP <5.3