Fix dependency order for built version of lib