fix includes and missing link library