I don't know if you figured this out already, but I had to do it today. I am working on making a mobile app within a Kentico 6 site using the LungoJS framework. I needed to add the CssClass "app" to the body so it would work without me changing the built in code.
I am using a portal master template (not aspx) using the ascx markup mode. If you can gain reference to the Page object and cast it to it's CMSPage_PortalTemplate type, then you can change the BodyClass property from any control on the page. You will have to reference the PortalTemplate.aspx file via virtual path reference in order to cast it.
Here is a working example:
<%@ Reference VirtualPath="~/CMSPages/PortalTemplate.aspx" %>
<script runat="server">
protected void Page_PreRender(Object sender, EventArgs e)
{
((CMSPages_PortalTemplate)this.Page).BodyClass +=" app";
}
</script>