Use number_format instead of strval for international bcmath calculations.

Created my other pull-request (#1521) on the wrong branch, so recreating it here on the trunk branch.

This fixes bug #1505.