Buildfix (Harmattan and Blackberry): stdlib is required for abs(int).