Fixed compilation when using external libraries