Use String#b if available

Besides, ruby 2.1 introduces Frozen String optimization and
"literal".to_s.force_encoding('BINARY') will raise RuntimeError saying
"can't modify frozen String".