Attempt to workaround shell security issues found by @lcamtuf.