fix for issue #310 (masked arrays not returned correctly when variable has non-native endian-ness)