fix #2584, missing undefined reference check
Merge branch 'master' of github.com:JuliaLang/julia