Fix incorrect buffer size calculation

This was discovered on OpenBSD which is far more aggressive about
using canaries and placing buffers at memory boundaries. In particular
this most often bites when a scalar is of length 0 because, unlike
Linux and MacOS X, OpenBSD does not return a memory pointer just
before a pre-zeroed section of accessible memory. Therefore any read
or write accesses to the returned pointer will typically result in a
segmenetation fault on that platform.
Update tests for OpenBSD

This will allow all acceptance tests on OpenBSD to pass except for
00_basics/03_bodies/118.cf which is due to a bug in OpenBSD's
implementation of grep. When OpenBSD's grep is corrected or replaced
with GNU grep, that test also passes.
Merge pull request #278 from jeramey/3.4.x

OpenBSD support in 3.4.x