Fixes #4670. Make adminshout work with ajax.