Fix seg fault

One possible setup to use the dynamic linking. Not sure if it is worth
the added complexity.