Check for IO::set_encoding support

See edge case described here, for details: https://github.com/jsvine/gekyll/commit/6228e0e3
Merge pull request #39 from jsvine/master

Check for IO::set_encoding support