Connecting Arduino Due to Sparkfun SEN-10121 via I2C and FreeSixIMU library

I am trying to get connect an Arduino Due to this accelerometer/gyro chip.

I was able to successfully interface an Arduino Uno with the chip using the FreeSixIMU library from here.

I am using the Linux command line version of the IDE (version 1.6.5, SAM board version 1.6.4) to edit and upload sketches rather than the GUI.

Attempting to upload the sketch with

arduino --board arduino:sam:due --port /dev/ttyACM0 --upload sixDOF_Example.ino

gives this traceback:

Picked up JAVA_TOOL_OPTIONS: 
Loading configuration...
Initializing packages...
Preparing boards...
Verifying and uploading...
In file included from /home/user/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/WString.h:29:0,
                 from /home/user/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Print.h:26,
                 from /home/user/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/Stream.h:26,
                 from /home/user/.arduino15/packages/arduino/hardware/sam/1.6.4/libraries/Wire/Wire.h:27,
                 from /home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.h:24,
                 from /home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.cpp:26:
/home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.cpp: In member function 'void FreeSixIMU::init(int, int, bool)':
/home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.cpp:71:9: error: 'PORTD' was not declared in this scope
     cbi(PORTD, 0);
         ^
/home/user/.arduino15/packages/arduino/hardware/sam/1.6.4/cores/arduino/avr/pgmspace.h:10:23: note: in definition of macro '_SFR_BYTE'
 #define _SFR_BYTE(n) (n)
                       ^
/home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.cpp:71:5: note: in expansion of macro 'cbi'
     cbi(PORTD, 0);
     ^
In file included from /home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.cpp:26:0:
/home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.h:45:50: error: '_BV' was not declared in this scope
 #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
                                                  ^
/home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.cpp:71:5: note: in expansion of macro 'cbi'
     cbi(PORTD, 0);
     ^
/home/user/Arduino/libraries/FreeSixIMU/FreeSixIMU.cpp:76:5: error: 'TWBR' was not declared in this scope
     TWBR = ((16000000L / 400000L) - 16) / 2; // see twi_init in Wire/utility/twi.c
     ^
Error compiling.

.

sixDOF_Example.ino is a simple example program that worked well with the Uno:

#include <FreeSixIMU.h>
#include <FIMU_ADXL345.h>
#include <FIMU_ITG3200.h>

#include <Wire.h>

float angles[3]; // yaw pitch roll

// Set the FreeSixIMU object
FreeSixIMU sixDOF = FreeSixIMU();

void setup() { 
  Serial.begin(9600);
  Wire.begin();
  
  delay(5);
  sixDOF.init(); //begin the IMU
  delay(5);
}

void loop() { 
  
  sixDOF.getEuler(angles);
  
  Serial.print(angles[0]);
  Serial.print(" | ");  
  Serial.print(angles[1]);
  Serial.print(" | ");
  Serial.println(angles[2]);
  
  delay(100); 
}

The Wire.h file referenced above is the same as that found here.

I have seen that I2C and Due do not always mix well (http://forum.arduino.cc/index.php?topic=146802.0). What are the steps I need to take to use I2C with the Due? Is it possible to use libraries designed for use with an AVR board (Uno) with a SAM board (Due), or do I need to find alternatives? If so, what resources are there to find libraries that work out of the box with the Due?

Thanks for your help!