Fix libs inclusion order