Synchronized PHP extensions with 5.4 compatibility fixes