some compile fixes
add checks for more recent gmerlin versions