fixed compile errors with headers and math library