Fix Travis CI and replace .to_str() by .to_string()

I've fixed the `to_str()` thing by reworking `from_rfc_compliant`. I've also munged LD_LIBRARY_PATH so that the Travis CI build succeeds.

Thanks @chertov and @theptrk for the initial changes. Sorry that I didn't use your commits, the stacking was just getting a bit crazy :P