Expose plugin precondition check as a function.

I haven't managed to properly export the preconditions_t symbol from a
plugin, so instead of this it's now a function returning preconditions.