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

same fix exists in original code:
https://svn.apache.org/viewvc?view=revision&revision=1152309