compile fixes based on patch (SF#913238 http://sourceforge.net/tracker/index.php...