replace usage of itoa with snprintf
implemented xerotl to replace win32 specific _rotl usage