MKR WAN 1310 with GY-271 (magnetic Sensor)

Hello,

I want to use my GY-271 (QMC5883L) with my MKR WAN 1310 but I can't get it running. The sensor works fine on my Arduino UNO R3.

I tried following libraries:

I always get the same readings. Do I need to adapt the code for the MKR WAN 1310? I used the example codes of the libraries.