Try to fix compilation problems

Make sure this works first. Currently it is set to link dynamically - I still get a linker error.