fixing build script for OSX
fix handling POST data with character set added to "Content-Type" header

handling POST data did not take into account that the
content-type header may have a character set added.
Hence the whole header value was compared to
"application/x-www-form-urlencoded" which failes in case a
character set was passed along the content type.