Export as string, not binary
Fix RSA public keys header for PHP compatibility

The PEM encodings of PHP do not support RSA PUBLIC KEYS.
They only support PUBLIC KEYS in the header.
Just drop RSA when exporting keys for over protocol communication.