Allow building both as library and executable at the same time. Change-Id: Idc40354fdedaeace727043936352fc17232bf16e