Fix `plenv()` function in ksh and dash.

dash doesn't support `typeset`.  Use `local` instead.

This commit is inspired by sstephenson/rbenv@5ae2cac088d12fea01054e1f3abbf304b92920b5 .
Merge pull request #56 from dochang/shell-fixes

Fix `plenv()` function in ksh and dash.