Fix external compilation