Portability fix: Build where sizeof is not compatible with int