Do not assume CONTENT_TYPE is available.

In some server environments notably the CLI server, _SERVER['CONTENT_TYPE'] is not available.
In these cases, fall back to the HTTP_CONTENT_TYPE header.

Refs #GH-1661
Merge pull request 1661 from 'sime/fallback-content-type' to master.
Merge branch 'master' of github.com:cakephp/cakephp