fixed test related issues in some CMakeLists
fixed exporting python API to address #10