Replacing header function for nginx compatibility.

Thanks to Elliot Tucker!