Use offsetof() from sys/types.h instead of a custom one
This fixes build with recent gcc versions