cast to a (long) for freebsd compatibility

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>