Fix nimprof import error when --threads:on.
Merge pull request #1210 from boydgreenfield/nimprof-lock-fix

Fix nimprof import error when --threads:on.