compile fixes - would not compile otherwise with ubuntu 12.10