Fixed formatMoney function (original from PHP.net was bugged)