How to get lensfun working for darktable

lensfun.h contains this for 0.3.2:

#define LF_MAX_DATABASE_VERSION 1

and this for 0.3.95:

#define LF_MAX_DATABASE_VERSION 2

The only ‘distro’ I specifically know to be deploying a 0.3.95 lensfun package is the MSYS2 environment for Windows.