Use Performance API in Workers (when available)

On some platforms (notably: Chrome and Opera), the Performance API is available thru the "performance" property of the global scope. This patch makes sure the performance API is used under those circumstances.