Fix mode of autogen.sh

Signed-off-by: Rob Caelers <rob.caelers@gmail.com>
Support old and new API of libpanelapplet

Signed-off-by: Rob Caelers <rob.caelers@gmail.com>