Streamline encode/decode options

Both -attribute-defined and [Options]-defined.
Make it work under R14* OTP version