Initialize smex after the variables have been set

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>