Could you please share the of the "Arduino AVR Boards" used in your project? You can find your version from the Boards Manager or inside the platform.txt file (line 9).
The latest version of the Arduino AVR Boards I can find is v1.8.3, which seems to come with external libraries support by default. I can successfully compile the basic example for the Arduino Mega 2560 board with the BSEC Software Library v1.5.1474, Arduino IDE v1.8.13 and Arduino AVR Boards v1.8.3.
... View more