_prepare_env: check definedness instead of value

Check whether inputbuf is defined instead of evaluating it for truth.

The old behavior caused a body consisting only of "0" to disappear; this
commit fixes the problem.

This is essentially a duplicate of https://github.com/PerlDancer/Dancer/pull/858.