Fix compilation as a shared and a static library at the same time.