Fixed Issue 313

Fixed issue 313, more details in:
https://github.com/sparklemotion/mechanize/issues/313