resolve undefined references

fully link internal dependencies, needed for creating dll