Fixed bug 951709, changed the HOSTNAME variable to APP_HOSTNAME

ref: https://bugzilla.mozilla.org/show_bug.cgi?id=951709