fixed #18: detect runtime by Components.classes

use Components.classes to detect platform if using firefox extension, otherwise using process by default.