Fix segfaulting on strstr() failure

See https://groups.google.com/forum/#!topic/julia-dev/aMWL08cQDsc for details