Replacing itoa with sprintf to enable linux compilation