Support cross-compiling for iOS (armv7)

`as_bytes()` directly isn't good idea as it fails on null string. But yep, `match` isn't required, changed to if.