Beauty company posts better-than-expected revenue on online strength