fix segfault due to lib2c.a

now works on debian jessie at least. More tests required