So, it turns out that for gfortran shared libraries the endianness is specified at runtime, rather than at compile time. Therefore, all that needs to be done is:
ENV["GFORTRAN_CONVERT_UNIT"] = "big_endian"
before ccall and then it works correctly.
Reference here.
Thanks!