Fix parse_options_header to handle RFC2616

The current version of the function does not handle correctly the
multiple MIME type version of the header as described in RFC2616. This
patches fixes that. It also fixes #404 at the same time.