Incompatibility with Espressif 32 v4.0.0 and higher

See Github Issue

When compiling using espressif 32 version higher than 3.5.0 I get these errors at link stage:

Linking .pio\build\heltec_wireless_stick_lite\firmware.elf
.pio\build\heltec_wireless_stick_lite\lib486\libESP32_LoRaWAN.a(rtc-board.S.o): in function TimerGetTimerValue': D:\\61722\\Documents\\Arduino\\libraries\\ESP32_LoRaWAN_VASR\\src\/rtc-board.c:95:(.text.TimerGetTimerValue+0x27): dangerous relocation: call8: call target out of range: __udivdi3 .pio\build\heltec_wireless_stick_lite\lib486\libESP32_LoRaWAN.a(rtc-board.S.o): in function TimerGetElapsedAlarmTime’:
D:\61722\Documents\Arduino\libraries\ESP32_LoRaWAN_VASR\src/rtc-board.c:108:(.text.TimerGetElapsedAlarmTime+0x3a): dangerous relocation: call8: call target out of range: __udivdi3
.pio\build\heltec_wireless_stick_lite\lib486\libESP32_LoRaWAN.a(rtc-board.S.o): in function `TimerComputeElapsedTime’:
D:\61722\Documents\Arduino\libraries\ESP32_LoRaWAN_VASR\src/rtc-board.c:135:(.text.TimerComputeElapsedTime+0x32): dangerous relocation: call8: call target out of range: __udivdi3
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\heltec_wireless_stick_lite\firmware.elf] Error 1

platformio.ini
[env:heltec_wireless_stick]
platform = espressif32
board = heltec_wireless_stick
framework = arduino
lib_deps =
heltecautomation/Heltec ESP32 Dev-Boards@^1.1.0
heltecautomation/ESP32_LoRaWAN@^2.1.1