fixed alternate form for 'x' and 'X' formats

same fix exists in original code:
https://svn.apache.org/viewvc?view=revision&revision=1152309
Merge branch 'PHP-5.4' into PHP-5.5