@Geoffroy Are you by any chance using a Due? There was a bug in the Wire library for the Due: https://github.com/arduino/Arduino/issues/1976 which will be available when a new release of the Arduino IDE is available - or simply compile the IDE yourself. For now simply ignore the returned value.
You will need to buy a HMC5883L 3-axis magnetometer as well and use it together with the MPU-6050. Note that "GY-521" is just the name of the breakout board and not the sensor. The sensor on the "GY-521" is the MPU-6050.