PHP build fixes