broken when support for binary data was added. The terminating
NUL was included in the string as a character (that's in addition
to the terminating NUL added by std::string).
lib/arch. This should make porting easier. Will probably
continue to refactor a little more, moving platform dependent
event handling stuff into lib/platform.