I’m pretty sure that platformio uses mbed v3 (note that the RTOS seems to have different versioning from the mbed framework, see the github releases page).
There is some difference between the RTOS/non-RTOS versions of mbed which I don’t fully understand. I do know that under platformio you can include the mbed-events library with #include "mbed_events.h".
Support for this library has just been added to platformio in this merged pull request. I don’t think a new release has been done since then, so this change is not currently included in platformio.
However, if you look at the changes made by the pull request, you’ll see that they are pretty trivial. So if you can find where all the libraries are under your .platformio folder, it is easy enough to make the change manually as a short term solution.