pass our cc/cflags/ldflags; fix .so file perms