Fixed gcc 4.4.6 issue with undefined sprintf