Add fixes for NetBSD and aggregate arrays

The NetBSD fix came from joerg and the aggregate array fix came from
gcc 4.8 and detected by attempts to compile ASIS 2013.