Fix a -Wformat warning on FreeBSD
On FreeBSD we get a long long result so %ld triggers a warning. Cast to long long and use %lld to make it work on all platforms (including 32-bit).
On FreeBSD we get a long long result so %ld triggers a warning. Cast to long long and use %lld to make it work on all platforms (including 32-bit).