compile fixes for older gcc versions

Fixes #1