fixed for newer autotools, fixed compiler warnings