update: move platform-specific code into plugin factory.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>