Switch to using SCRIPT_DEBUG for toggling script minification

Thanks to Paul Bearne (@pbearne) for the suggestion