fixup SOS demo so it runs cleanly

make sure libs are included before use so that nbviewer can load the
page.