Update media.php

This update will prevent some servers from sending thumbnails with broken headers to the admin panel, when viewing the media list attached to each page. 

If you host your Ionize project on certain servers, you are just not able to see thumbnails since they are sent as an AJAX response with bad headers.  

Believe me, at this moment, 50% of the servers I've worked with have this issue.