Fixed ostringstream conversion problem on Linux.

@MarcCote: can you check that this fixes your problem? I tested on my Ubuntu setup and it fixed it.