Using portable_snprintf to make Windows compilation happy