Update local-shim.coffee

check whether externalRequire actually exists before accessing it