Make ext PHP 5.4 compatible
Add support for NTS
Merge remote-tracking branch 'upstream/master'