--- character_r11.cc	2013-06-21 01:35:33.000000000 +0200
+++ character_r11.cc	2013-12-14 12:20:37.000000000 +0100
@@ -20,6 +20,7 @@
 #include <cstdio>
 #include <vector>
 #include <stdint.h>
+#include <cstdlib>
 
 #include "common.h"
 #include "rectangle.h"
@@ -229,7 +230,7 @@
   Features f( b );
   int top_delta = h.top() - b.top(), bottom_delta = b.bottom() - h.bottom();
 
-  if( std::abs( top_delta - bottom_delta ) <= std::max( 2, h.height() / 4 ) ||
+  if( abs( top_delta - bottom_delta ) <= std::max( 2, h.height() / 4 ) ||
       Ocrad::similar( top_delta, bottom_delta, 40, 2 ) )
     {					// hole is vertically centred
     int code = f.test_4ADQao( charset, charbox );
@@ -283,15 +284,15 @@
   Profile bp( b, Profile::bottom );
 
   // Check for 'm' or 'w' with merged serifs
-  if( 10 * std::abs( h2.vcenter() - h1.vcenter() ) <= b.height() &&
+  if( 10 * abs( h2.vcenter() - h1.vcenter() ) <= b.height() &&
       h1.is_vcentred_in( b ) && h2.is_vcentred_in( b ) )
     {
     if( ( b.bottom() - h1.bottom() <= h1.top() - b.top() ) &&
         ( b.bottom() - h2.bottom() <= h2.top() - b.top() ) && bp.isflats() )
       { add_guess( 'm', 0 ); return; }
 
-    if( 5 * std::abs( h1.bottom() - b.vcenter() ) <= b.height() &&
-        5 * std::abs( h2.bottom() - b.vcenter() ) <= b.height() &&
+    if( 5 * abs( h1.bottom() - b.vcenter() ) <= b.height() &&
+        5 * abs( h2.bottom() - b.vcenter() ) <= b.height() &&
         tp.isflats() && bp.minima() == 2 )
       { add_guess( 'w', 0 ); return; }
     return;