fixes a bug in noclasspath mode (NPE in some special cases)
Merge pull request #77 from monperrus/Bug20141021